clear all
cd "/Users/efetokdemir/Desktop/Dal&Tokdemir_POBE-D-21-0031_Replication"
use Dal&Tokdemir_POBE-D-21-0031.dta

svyset, clear
svyset id [pweight= wsett], strata(bolge)

lab var provaccine "Pro-Vaccine Intention"
lab var fiduciarymean "Perceived Fiduciary Resp."
lab var competencemean "Perceived Competence"
lab var kurd "Kurd"
lab var opposfeel "Anti-Government"
lab var jobseeker "Unemployed"
lab var couple "Non-Single"
lab var age "Age"
lab var female "Female"
lab var education "Education"
lab var income "Income"
lab var covidknow "COVID Knowledge"
lab var religiosity "Religiosity"
lab var covidegothreat "COVID Concern"
lab var covidsociothreat "COVID Threat"
lab var covidexpbinary "COVID Experience"
lab var OHAL "Conflict Zone"
lab var kurdOHAL "Kurds in Conflict Zone"


*Table 1
sutex provaccine fiduciarymean competencemean kurd opposfeel female jobseeker income age education religiosity couple covidknow covidegothreat covidsociothreat covidexpbinary, digits(3) lab nobs minmax title("Summary statistics")

*Table 2
eststo m1: svy: reg competencemean kurd
eststo m2: svy: reg competencemean kurd opposfeel
eststo m3: svy: reg competencemean kurd opposfeel religiosity couple income jobseeker education age female
eststo m4: svy: reg competencemean kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m5: svy: reg fiduciarymean kurd
eststo m6: svy: reg fiduciarymean kurd opposfeel
eststo m7: svy: reg fiduciarymean kurd opposfeel religiosity couple income jobseeker education age female
eststo m8: svy: reg fiduciarymean kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
esttab m1 m2 m3 m4 m5 m6 m7 m8 using "Table2.tex", tex replace b(%10.3f) se scalars("r2 \$R^2\$") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)

*Figure 2
svy: reg fiduciarymean kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
margins, at(kurd=(0 1) opposfeel=(0 1)) vsquish
marginsplot, x(kurd) recast(line) xlabel(0 1) level(95) 

svy: reg competencemean kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
margins, at(kurd=(0 1) opposfeel=(0 1)) vsquish
marginsplot, x(kurd) recast(line) xlabel(0 1) level(95) 

*Table 3
eststo m1:svy: reg provaccine fiduciarymean i.covtreat
eststo m2:svy: reg provaccine fiduciarymean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female
eststo m3:svy: reg provaccine fiduciarymean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m4:svy: reg provaccine competencemean i.covtreat
eststo m5:svy: reg provaccine competencemean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female
eststo m6:svy: reg provaccine competencemean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m7:svy: reg provaccine fiduciarymean competencemean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
esttab m1 m2 m3 m4 m5 m6 m7 using "Table3.tex", tex replace b(%10.3f) se scalars("r2 \$R^2\$") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)

*Figure 3
svy: reg provaccine competencemean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
margins, at(competencemean=(0 (1) 10)) vsquish
marginsplot, x(competencemean) recast(line) xlabel(0 1 2 3 4 5 6 7 8 9 10) level(95) 

svy: reg provaccine fiduciarymean i.covtreat kurd opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
margins, at(fiduciarymean=(1 (1) 5)) vsquish
marginsplot, x(fiduciarymean) recast(line) xlabel(1 2 3 4 5) level(95) 

****SPSS Syntax for Mediation Analyses Using PROCESS Macro****
WEIGHT BY wsett.
process y=provaccine/x=kurd/m=fiduciarymean/cov=opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary covtreat
	/conf=99/effsize=1/stand=1/model=4/boot=5000/longname =1/total =1.

WEIGHT BY wsett.
process y=provaccine/x=kurd/m=competencemean/cov=opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary covtreat
    /conf=90/effsize=1/stand=1/model=4/boot=5000/longname =1/total =1.

WEIGHT BY wsett.
process y=provaccine/x=opposfeel/m= fiduciarymean/cov=kurd religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary covtreat 
    /conf=99/effsize=1/stand=1/model=4/boot=5000/longname =1/total =1.

WEIGHT BY wsett.
process y=provaccine/x=opposfeel/m=competencemean /cov=kurd religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary covtreat
    /conf=99/effsize=1/stand=1/model=4/boot=5000/longname =1/total =1.
****


*Online Appendix B
corrtex provaccine fiduciarymean competencemean kurd opposfeel female jobseeker income age education religiosity couple covidknow covidegothreat covidsociothreat covidexpbinary, file(Correlation)

***Online Appendix C
eststo m1: svy, subpop(kurd): mean provaccine if OHAL==1, over(covtreat)
eststo m2: svy, subpop(turk): mean provaccine if OHAL==1, over(covtreat)
eststo m3: svy, subpop(opposfeel): mean provaccine, over(covtreat)
eststo m4: svy, subpop(cumhurfeel): mean provaccine, over(covtreat)
coefplot m1 m2 || m3 m4, vertical xlabel(1 "Police" 2 "Min. of Health" 3 "Municipality" 4 "Private") ylabel(4 5 6 7 8 9) ytitle("Pro-Vaccine Behavior") xtitle("Vaccine Implementer")

*Online Appendix D
sum age income education female religiosity jobseeker couple kurd opposfeel if covtreat==1
sum age income education female religiosity jobseeker couple kurd opposfeel if covtreat==2
sum age income education female religiosity jobseeker couple kurd opposfeel if covtreat==3
sum age income education female religiosity jobseeker couple kurd opposfeel if covtreat==4
oneway covtreat age 
oneway covtreat income 
oneway covtreat education 
oneway covtreat female
oneway covtreat jobseeker
oneway covtreat religiosity
oneway covtreat kurd
oneway covtreat opposfeel 
oneway covtreat couple 

*Online Appendix F
eststo m1: svy: reg fiduciarymean kurd OHAL kurdOHAL
eststo m2: svy: reg fiduciarymean kurd OHAL kurdOHAL opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m3: svy: reg competencemean kurd OHAL kurdOHAL
eststo m4: svy: reg competencemean kurd OHAL kurdOHAL opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m5: svy: reg provaccine fiduciarymean i.covtreat kurd OHAL kurdOHAL opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m6: svy: reg provaccine competencemean i.covtreat kurd OHAL kurdOHAL opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
eststo m7: svy: reg provaccine fiduciarymean competencemean i.covtreat kurd OHAL kurdOHAL opposfeel religiosity couple income jobseeker education age female covidknow covidegothreat covidsociothreat covidexpbinary
esttab m1 m2 m3 m4 m5 m6 m7 using "RobustH2a.tex", tex replace b(%10.3f) se scalars("r2 \$R^2\$") label starlevels(* 0.05 ** 0.01 *** 0.001) varlabels(_cons Constant)

